/*
 * FileName:       tds.c
 * Author:         luny  Version: 1.0  Date: 2013-6-14
 * Description:    onvif device service
 * Version:        
 * Function List:  
 *                 1.
 * History:        
 *     <author>   <time>    <version >   <desc>
 */


int soap_call___tds__GetSystemDateAndTime(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetSystemDateAndTime *tds__GetSystemDateAndTime, struct _tds__GetSystemDateAndTimeResponse *tds__GetSystemDateAndTimeResponse)
{
    struct __tds__GetSystemDateAndTime soap_tmp___tds__GetSystemDateAndTime;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetSystemDateAndTime";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetSystemDateAndTime.tds__GetSystemDateAndTime = tds__GetSystemDateAndTime;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetSystemDateAndTime(soap, &soap_tmp___tds__GetSystemDateAndTime);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetSystemDateAndTime(soap, &soap_tmp___tds__GetSystemDateAndTime, "-tds:GetSystemDateAndTime", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetSystemDateAndTime(soap, &soap_tmp___tds__GetSystemDateAndTime, "-tds:GetSystemDateAndTime", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetSystemDateAndTimeResponse)
        return soap_closesock(soap);
    soap_default__tds__GetSystemDateAndTimeResponse(soap, tds__GetSystemDateAndTimeResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetSystemDateAndTimeResponse(soap, tds__GetSystemDateAndTimeResponse, "tds:GetSystemDateAndTimeResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetSystemDateAndTime(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetSystemDateAndTime *tds__SetSystemDateAndTime, struct _tds__SetSystemDateAndTimeResponse *tds__SetSystemDateAndTimeResponse)
{
   struct __tds__SetSystemDateAndTime soap_tmp___tds__SetSystemDateAndTime;
   if (soap_action == NULL)
       soap_action = "http://www.onvif.org/ver10/device/wsdl/SetSystemDateAndTime";
   soap->encodingStyle = NULL;
   soap_tmp___tds__SetSystemDateAndTime.tds__SetSystemDateAndTime = tds__SetSystemDateAndTime;
   soap_begin(soap);
   soap_serializeheader(soap);
   soap_serialize___tds__SetSystemDateAndTime(soap, &soap_tmp___tds__SetSystemDateAndTime);
   if (soap_begin_count(soap))
       return soap->error;
   if (soap->mode & SOAP_IO_LENGTH)
   {
       if (soap_envelope_begin_out(soap)
           || soap_putheader(soap)
           || soap_body_begin_out(soap)
           || soap_put___tds__SetSystemDateAndTime(soap, &soap_tmp___tds__SetSystemDateAndTime, "-tds:SetSystemDateAndTime", NULL)
           || soap_body_end_out(soap)
           || soap_envelope_end_out(soap))
           return soap->error;
   }
   if (soap_end_count(soap))
       return soap->error;
   if (soap_connect(soap, soap_endpoint, soap_action)
       || soap_envelope_begin_out(soap)
       || soap_putheader(soap)
       || soap_body_begin_out(soap)
       || soap_put___tds__SetSystemDateAndTime(soap, &soap_tmp___tds__SetSystemDateAndTime, "-tds:SetSystemDateAndTime", NULL)
       || soap_body_end_out(soap)
       || soap_envelope_end_out(soap)
       || soap_end_send(soap))
       return soap_closesock(soap);
   if (!tds__SetSystemDateAndTimeResponse)
       return soap_closesock(soap);
   soap_default__tds__SetSystemDateAndTimeResponse(soap, tds__SetSystemDateAndTimeResponse);
   if (soap_begin_recv(soap)
       || soap_envelope_begin_in(soap)
       || soap_recv_header(soap)
       || soap_body_begin_in(soap))
       return soap_closesock(soap);
   soap_get__tds__SetSystemDateAndTimeResponse(soap, tds__SetSystemDateAndTimeResponse, "tds:SetSystemDateAndTimeResponse", "");
   if (soap->error)
       return soap_recv_fault(soap, 0);
   if (soap_body_end_in(soap)
       || soap_envelope_end_in(soap)
       || soap_end_recv(soap))
       return soap_closesock(soap);
   return soap_closesock(soap);
}

int soap_call___tds__GetRelayOutputs(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetRelayOutputs *tds__GetRelayOutputs, struct _tds__GetRelayOutputsResponse *tds__GetRelayOutputsResponse)
{
    struct __tds__GetRelayOutputs soap_tmp___tds__GetRelayOutputs;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetRelayOutputs";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetRelayOutputs.tds__GetRelayOutputs = tds__GetRelayOutputs;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetRelayOutputs(soap, &soap_tmp___tds__GetRelayOutputs);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetRelayOutputs(soap, &soap_tmp___tds__GetRelayOutputs, "-tds:GetRelayOutputs", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetRelayOutputs(soap, &soap_tmp___tds__GetRelayOutputs, "-tds:GetRelayOutputs", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetRelayOutputsResponse)
        return soap_closesock(soap);
    soap_default__tds__GetRelayOutputsResponse(soap, tds__GetRelayOutputsResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetRelayOutputsResponse(soap, tds__GetRelayOutputsResponse, "tds:GetRelayOutputsResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetRelayOutputSettings(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetRelayOutputSettings *tds__SetRelayOutputSettings, struct _tds__SetRelayOutputSettingsResponse *tds__SetRelayOutputSettingsResponse)
{
    struct __tds__SetRelayOutputSettings soap_tmp___tds__SetRelayOutputSettings;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetRelayOutputSettings";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetRelayOutputSettings.tds__SetRelayOutputSettings = tds__SetRelayOutputSettings;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetRelayOutputSettings(soap, &soap_tmp___tds__SetRelayOutputSettings);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetRelayOutputSettings(soap, &soap_tmp___tds__SetRelayOutputSettings, "-tds:SetRelayOutputSettings", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetRelayOutputSettings(soap, &soap_tmp___tds__SetRelayOutputSettings, "-tds:SetRelayOutputSettings", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetRelayOutputSettingsResponse)
        return soap_closesock(soap);
    soap_default__tds__SetRelayOutputSettingsResponse(soap, tds__SetRelayOutputSettingsResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetRelayOutputSettingsResponse(soap, tds__SetRelayOutputSettingsResponse, "tds:SetRelayOutputSettingsResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetRelayOutputState(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetRelayOutputState *tds__SetRelayOutputState, struct _tds__SetRelayOutputStateResponse *tds__SetRelayOutputStateResponse)
{
    struct __tds__SetRelayOutputState soap_tmp___tds__SetRelayOutputState;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetRelayOutputState";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetRelayOutputState.tds__SetRelayOutputState = tds__SetRelayOutputState;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetRelayOutputState(soap, &soap_tmp___tds__SetRelayOutputState);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetRelayOutputState(soap, &soap_tmp___tds__SetRelayOutputState, "-tds:SetRelayOutputState", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetRelayOutputState(soap, &soap_tmp___tds__SetRelayOutputState, "-tds:SetRelayOutputState", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetRelayOutputStateResponse)
        return soap_closesock(soap);
    soap_default__tds__SetRelayOutputStateResponse(soap, tds__SetRelayOutputStateResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetRelayOutputStateResponse(soap, tds__SetRelayOutputStateResponse, "tds:SetRelayOutputStateResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SystemReboot(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SystemReboot *tds__SystemReboot, struct _tds__SystemRebootResponse *tds__SystemRebootResponse)
{
    struct __tds__SystemReboot soap_tmp___tds__SystemReboot;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SystemReboot";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SystemReboot.tds__SystemReboot = tds__SystemReboot;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SystemReboot(soap, &soap_tmp___tds__SystemReboot);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SystemReboot(soap, &soap_tmp___tds__SystemReboot, "-tds:SystemReboot", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SystemReboot(soap, &soap_tmp___tds__SystemReboot, "-tds:SystemReboot", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SystemRebootResponse)
        return soap_closesock(soap);
    soap_default__tds__SystemRebootResponse(soap, tds__SystemRebootResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SystemRebootResponse(soap, tds__SystemRebootResponse, "tds:SystemRebootResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetSystemFactoryDefault(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetSystemFactoryDefault *tds__SetSystemFactoryDefault, struct _tds__SetSystemFactoryDefaultResponse *tds__SetSystemFactoryDefaultResponse)
{
    struct __tds__SetSystemFactoryDefault soap_tmp___tds__SetSystemFactoryDefault;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetSystemFactoryDefault";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetSystemFactoryDefault.tds__SetSystemFactoryDefault = tds__SetSystemFactoryDefault;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetSystemFactoryDefault(soap, &soap_tmp___tds__SetSystemFactoryDefault);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetSystemFactoryDefault(soap, &soap_tmp___tds__SetSystemFactoryDefault, "-tds:SetSystemFactoryDefault", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetSystemFactoryDefault(soap, &soap_tmp___tds__SetSystemFactoryDefault, "-tds:SetSystemFactoryDefault", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetSystemFactoryDefaultResponse)
        return soap_closesock(soap);
    soap_default__tds__SetSystemFactoryDefaultResponse(soap, tds__SetSystemFactoryDefaultResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetSystemFactoryDefaultResponse(soap, tds__SetSystemFactoryDefaultResponse, "tds:SetSystemFactoryDefaultResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetHostname(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetHostname *tds__GetHostname, struct _tds__GetHostnameResponse *tds__GetHostnameResponse)
{
    struct __tds__GetHostname soap_tmp___tds__GetHostname;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetHostname";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetHostname.tds__GetHostname = tds__GetHostname;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetHostname(soap, &soap_tmp___tds__GetHostname);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetHostname(soap, &soap_tmp___tds__GetHostname, "-tds:GetHostname", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetHostname(soap, &soap_tmp___tds__GetHostname, "-tds:GetHostname", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetHostnameResponse)
        return soap_closesock(soap);
    soap_default__tds__GetHostnameResponse(soap, tds__GetHostnameResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetHostnameResponse(soap, tds__GetHostnameResponse, "tds:GetHostnameResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetHostname(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetHostname *tds__SetHostname, struct _tds__SetHostnameResponse *tds__SetHostnameResponse)
{
    struct __tds__SetHostname soap_tmp___tds__SetHostname;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetHostname";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetHostname.tds__SetHostname = tds__SetHostname;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetHostname(soap, &soap_tmp___tds__SetHostname);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetHostname(soap, &soap_tmp___tds__SetHostname, "-tds:SetHostname", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetHostname(soap, &soap_tmp___tds__SetHostname, "-tds:SetHostname", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetHostnameResponse)
        return soap_closesock(soap);
    soap_default__tds__SetHostnameResponse(soap, tds__SetHostnameResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetHostnameResponse(soap, tds__SetHostnameResponse, "tds:SetHostnameResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetDNS(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetDNS *tds__GetDNS, struct _tds__GetDNSResponse *tds__GetDNSResponse)
{
    struct __tds__GetDNS soap_tmp___tds__GetDNS;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetDNS";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetDNS.tds__GetDNS = tds__GetDNS;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetDNS(soap, &soap_tmp___tds__GetDNS);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetDNS(soap, &soap_tmp___tds__GetDNS, "-tds:GetDNS", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetDNS(soap, &soap_tmp___tds__GetDNS, "-tds:GetDNS", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetDNSResponse)
        return soap_closesock(soap);
    soap_default__tds__GetDNSResponse(soap, tds__GetDNSResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetDNSResponse(soap, tds__GetDNSResponse, "tds:GetDNSResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetDNS(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetDNS *tds__SetDNS, struct _tds__SetDNSResponse *tds__SetDNSResponse)
{
    struct __tds__SetDNS soap_tmp___tds__SetDNS;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetDNS";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetDNS.tds__SetDNS = tds__SetDNS;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetDNS(soap, &soap_tmp___tds__SetDNS);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetDNS(soap, &soap_tmp___tds__SetDNS, "-tds:SetDNS", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetDNS(soap, &soap_tmp___tds__SetDNS, "-tds:SetDNS", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetDNSResponse)
        return soap_closesock(soap);
    soap_default__tds__SetDNSResponse(soap, tds__SetDNSResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetDNSResponse(soap, tds__SetDNSResponse, "tds:SetDNSResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetNTP(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetNTP *tds__GetNTP, struct _tds__GetNTPResponse *tds__GetNTPResponse)
{
    struct __tds__GetNTP soap_tmp___tds__GetNTP;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetNTP";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetNTP.tds__GetNTP = tds__GetNTP;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetNTP(soap, &soap_tmp___tds__GetNTP);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetNTP(soap, &soap_tmp___tds__GetNTP, "-tds:GetNTP", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetNTP(soap, &soap_tmp___tds__GetNTP, "-tds:GetNTP", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetNTPResponse)
        return soap_closesock(soap);
    soap_default__tds__GetNTPResponse(soap, tds__GetNTPResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetNTPResponse(soap, tds__GetNTPResponse, "tds:GetNTPResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetNTP(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetNTP *tds__SetNTP, struct _tds__SetNTPResponse *tds__SetNTPResponse)
{
    struct __tds__SetNTP soap_tmp___tds__SetNTP;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetNTP";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetNTP.tds__SetNTP = tds__SetNTP;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetNTP(soap, &soap_tmp___tds__SetNTP);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetNTP(soap, &soap_tmp___tds__SetNTP, "-tds:SetNTP", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetNTP(soap, &soap_tmp___tds__SetNTP, "-tds:SetNTP", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetNTPResponse)
        return soap_closesock(soap);
    soap_default__tds__SetNTPResponse(soap, tds__SetNTPResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetNTPResponse(soap, tds__SetNTPResponse, "tds:SetNTPResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetNetworkInterfaces(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetNetworkInterfaces *tds__GetNetworkInterfaces, struct _tds__GetNetworkInterfacesResponse *tds__GetNetworkInterfacesResponse)
{
    struct __tds__GetNetworkInterfaces soap_tmp___tds__GetNetworkInterfaces;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetNetworkInterfaces";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetNetworkInterfaces.tds__GetNetworkInterfaces = tds__GetNetworkInterfaces;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetNetworkInterfaces(soap, &soap_tmp___tds__GetNetworkInterfaces);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetNetworkInterfaces(soap, &soap_tmp___tds__GetNetworkInterfaces, "-tds:GetNetworkInterfaces", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetNetworkInterfaces(soap, &soap_tmp___tds__GetNetworkInterfaces, "-tds:GetNetworkInterfaces", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetNetworkInterfacesResponse)
        return soap_closesock(soap);
    soap_default__tds__GetNetworkInterfacesResponse(soap, tds__GetNetworkInterfacesResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetNetworkInterfacesResponse(soap, tds__GetNetworkInterfacesResponse, "tds:GetNetworkInterfacesResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetNetworkInterfaces(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetNetworkInterfaces *tds__SetNetworkInterfaces, struct _tds__SetNetworkInterfacesResponse *tds__SetNetworkInterfacesResponse)
{
    struct __tds__SetNetworkInterfaces soap_tmp___tds__SetNetworkInterfaces;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetNetworkInterfaces";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetNetworkInterfaces.tds__SetNetworkInterfaces = tds__SetNetworkInterfaces;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetNetworkInterfaces(soap, &soap_tmp___tds__SetNetworkInterfaces);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetNetworkInterfaces(soap, &soap_tmp___tds__SetNetworkInterfaces, "-tds:SetNetworkInterfaces", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetNetworkInterfaces(soap, &soap_tmp___tds__SetNetworkInterfaces, "-tds:SetNetworkInterfaces", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetNetworkInterfacesResponse)
        return soap_closesock(soap);
    soap_default__tds__SetNetworkInterfacesResponse(soap, tds__SetNetworkInterfacesResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetNetworkInterfacesResponse(soap, tds__SetNetworkInterfacesResponse, "tds:SetNetworkInterfacesResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetNetworkDefaultGateway(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetNetworkDefaultGateway *tds__GetNetworkDefaultGateway, struct _tds__GetNetworkDefaultGatewayResponse *tds__GetNetworkDefaultGatewayResponse)
{
    struct __tds__GetNetworkDefaultGateway soap_tmp___tds__GetNetworkDefaultGateway;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetNetworkDefaultGateway";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetNetworkDefaultGateway.tds__GetNetworkDefaultGateway = tds__GetNetworkDefaultGateway;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetNetworkDefaultGateway(soap, &soap_tmp___tds__GetNetworkDefaultGateway);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetNetworkDefaultGateway(soap, &soap_tmp___tds__GetNetworkDefaultGateway, "-tds:GetNetworkDefaultGateway", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetNetworkDefaultGateway(soap, &soap_tmp___tds__GetNetworkDefaultGateway, "-tds:GetNetworkDefaultGateway", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetNetworkDefaultGatewayResponse)
        return soap_closesock(soap);
    soap_default__tds__GetNetworkDefaultGatewayResponse(soap, tds__GetNetworkDefaultGatewayResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetNetworkDefaultGatewayResponse(soap, tds__GetNetworkDefaultGatewayResponse, "tds:GetNetworkDefaultGatewayResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetNetworkDefaultGateway(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetNetworkDefaultGateway *tds__SetNetworkDefaultGateway, struct _tds__SetNetworkDefaultGatewayResponse *tds__SetNetworkDefaultGatewayResponse)
{
    struct __tds__SetNetworkDefaultGateway soap_tmp___tds__SetNetworkDefaultGateway;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetNetworkDefaultGateway";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetNetworkDefaultGateway.tds__SetNetworkDefaultGateway = tds__SetNetworkDefaultGateway;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetNetworkDefaultGateway(soap, &soap_tmp___tds__SetNetworkDefaultGateway);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetNetworkDefaultGateway(soap, &soap_tmp___tds__SetNetworkDefaultGateway, "-tds:SetNetworkDefaultGateway", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetNetworkDefaultGateway(soap, &soap_tmp___tds__SetNetworkDefaultGateway, "-tds:SetNetworkDefaultGateway", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetNetworkDefaultGatewayResponse)
        return soap_closesock(soap);
    soap_default__tds__SetNetworkDefaultGatewayResponse(soap, tds__SetNetworkDefaultGatewayResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetNetworkDefaultGatewayResponse(soap, tds__SetNetworkDefaultGatewayResponse, "tds:SetNetworkDefaultGatewayResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__GetNetworkProtocols(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__GetNetworkProtocols *tds__GetNetworkProtocols, struct _tds__GetNetworkProtocolsResponse *tds__GetNetworkProtocolsResponse)
{
    struct __tds__GetNetworkProtocols soap_tmp___tds__GetNetworkProtocols;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/GetNetworkProtocols";
    soap->encodingStyle = NULL;
    soap_tmp___tds__GetNetworkProtocols.tds__GetNetworkProtocols = tds__GetNetworkProtocols;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__GetNetworkProtocols(soap, &soap_tmp___tds__GetNetworkProtocols);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__GetNetworkProtocols(soap, &soap_tmp___tds__GetNetworkProtocols, "-tds:GetNetworkProtocols", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__GetNetworkProtocols(soap, &soap_tmp___tds__GetNetworkProtocols, "-tds:GetNetworkProtocols", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__GetNetworkProtocolsResponse)
        return soap_closesock(soap);
    soap_default__tds__GetNetworkProtocolsResponse(soap, tds__GetNetworkProtocolsResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__GetNetworkProtocolsResponse(soap, tds__GetNetworkProtocolsResponse, "tds:GetNetworkProtocolsResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}

int soap_call___tds__SetNetworkProtocols(struct soap *soap, const char *soap_endpoint, const char *soap_action, struct _tds__SetNetworkProtocols *tds__SetNetworkProtocols, struct _tds__SetNetworkProtocolsResponse *tds__SetNetworkProtocolsResponse)
{
    struct __tds__SetNetworkProtocols soap_tmp___tds__SetNetworkProtocols;
    if (soap_action == NULL)
        soap_action = "http://www.onvif.org/ver10/device/wsdl/SetNetworkProtocols";
    soap->encodingStyle = NULL;
    soap_tmp___tds__SetNetworkProtocols.tds__SetNetworkProtocols = tds__SetNetworkProtocols;
    soap_begin(soap);
    soap_serializeheader(soap);
    soap_serialize___tds__SetNetworkProtocols(soap, &soap_tmp___tds__SetNetworkProtocols);
    if (soap_begin_count(soap))
        return soap->error;
    if (soap->mode & SOAP_IO_LENGTH)
    {
        if (soap_envelope_begin_out(soap)
            || soap_putheader(soap)
            || soap_body_begin_out(soap)
            || soap_put___tds__SetNetworkProtocols(soap, &soap_tmp___tds__SetNetworkProtocols, "-tds:SetNetworkProtocols", NULL)
            || soap_body_end_out(soap)
            || soap_envelope_end_out(soap))
            return soap->error;
    }
    if (soap_end_count(soap))
        return soap->error;
    if (soap_connect(soap, soap_endpoint, soap_action)
        || soap_envelope_begin_out(soap)
        || soap_putheader(soap)
        || soap_body_begin_out(soap)
        || soap_put___tds__SetNetworkProtocols(soap, &soap_tmp___tds__SetNetworkProtocols, "-tds:SetNetworkProtocols", NULL)
        || soap_body_end_out(soap)
        || soap_envelope_end_out(soap)
        || soap_end_send(soap))
        return soap_closesock(soap);
    if (!tds__SetNetworkProtocolsResponse)
        return soap_closesock(soap);
    soap_default__tds__SetNetworkProtocolsResponse(soap, tds__SetNetworkProtocolsResponse);
    if (soap_begin_recv(soap)
        || soap_envelope_begin_in(soap)
        || soap_recv_header(soap)
        || soap_body_begin_in(soap))
        return soap_closesock(soap);
    soap_get__tds__SetNetworkProtocolsResponse(soap, tds__SetNetworkProtocolsResponse, "tds:SetNetworkProtocolsResponse", "");
    if (soap->error)
        return soap_recv_fault(soap, 0);
    if (soap_body_end_in(soap)
        || soap_envelope_end_in(soap)
        || soap_end_recv(soap))
        return soap_closesock(soap);
    return soap_closesock(soap);
}


